﻿using Coldairarrow.Util;
using Coldairarrow.Util.DTO.OnlineChat;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;

namespace Coldairarrow.IBusiness.BTB_StaffUsers
{
    public interface IUserOnlineChatBusiness
    {
        object GetRUserId();

        Task<GetRoomDTO> UserToRoomAsync(UserToRoomDTO input);

        Task UserSendMessageAsync(UserSendChatDTO input);

        Task UserGetUnReadCountAsync(UserToRoomDTO input);

        Task<ChatLogListDTO> GetUserMessageLogAsync(GetMassageDTO input);

        Task<PTUDTO> GetUserDataAsnyc(GTUDTO input);

        object GetUserSignsAsnyc(string userId);

        List<OnLinkUserDTO> GetOLUserList();

        List<CServiceDTO> GetOLSUserList();

        void ClearOLVSUserList();

        void DELOLUser(List<string> uIds);

        void ClearOLVUser();
    }

    public class GTUDTO
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public string UserId { set; get; }

        /// <summary>
        /// 类型（0.客户，1.客服:客服不传UserId，必传token）
        /// </summary>
        [Required]
        public int Type { set; get; }
    }

    public class PTUDTO
    {
        /// <summary>
        ///自己用户Id
        /// </summary>
        public string MUserId { set; get; }

        /// <summary>
        /// 自己用户名称
        /// </summary>
        public string MUserName { set; get; }

        /// <summary>
        /// 自己用户头像
        /// </summary>
        public string MUserHeadImg { set; get; }

        /// <summary>
        /// 自己用户头像类型
        /// </summary>
        public int? MUserHeadType { set; get; } = 0;

        /// <summary>
        /// 自己用户签名
        /// </summary>
        public string MUserSign { set; get; }

        /// <summary>
        /// sdkAppId
        /// </summary>
        public int SDKAppId { set; get; }
    }

    public class UserToRoomDTO
    {
        public string UserId { get; set; }

        public int Class { get; set; } = 0;
    }

    public class GetRoomDTO
    {
        public string Id { get; set; }

        /// <summary>
        /// 客服Id
        /// </summary>
        public string CSId { get; set; }

        public string ChatRoot_Name { get; set; }
    }

    public class ReplayInputDTO
    { 
        public string ChatLog_RoomId { set; get; }

        public string ChatLog_Content { set; get; }

        public string ChatRoot_StaffId { set; get; }

        public string ChatRoot_UserId { set; get; }

        public int ClassId { set; get; }
    }

    public class STLDTO
    {
        public string EStr { set; get; }
    }

    public class ASTDTO
    {
        public static List<ASTModel> ASTList { set; get; } = new List<ASTModel>();
    }

    public class ASTModel
    {
        public string StaffId { get; set; }
        public string UserId { get; set; }

        public string ATId { get; set; }

        public List<string> ATDId { get; set; }
    }
}
